#ifndef GALLERY_H
#define GALLERY_H

#include "../util/Eigen/Dense"
#include "Face.h"

using namespace Eigen;

class Gallery {
public:
	Gallery();
	~Gallery();
	
	void addFace(Face& face);
	void calculateOffsetMatrix();
	void calculateCovarianceMatrix();
	void calculateEigenvectors();
	void compareFace(Face& f, char algorithmType, double limit);
	
private:
	void calculateAverageFace();
	MatrixXf calculateVectorForFace(Face& f);
	
	vector<Face> faces;
	vector<double> averageFace;
	MatrixXf offsetMatrix;
	MatrixXf covarianceMatrix;
	MatrixXf eigenVectors;
	MatrixXf eigenValues;
};

#endif
